import React, { useState, useEffect } from 'react'
export default () => {
  console.log('Greet被执行')
  const [count, setCount] = useState(0)
  const btnClick = () => {
    setCount(count + 1)
  }
  useEffect(() => {
    console.log('useEffect 3333')
    return () => {
      console.log('组件被销毁333')
    }
  }, [])
  return (
    <>
      <h1>Hello, world!</h1>
      <div onClick={() => btnClick()}>{count}</div>
    </>
  )
}
